home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: 15 November 1995
- // Author: hmbw
- //
- // Description:
- // This implements the "Keys" menu on the main menubar.
- //
-
-
-
- // Procedure Name:
- // KeyframeMenu
- //
- // Description:
- // Post the Keyframe menu in the main menubar
- //
- // Input Arguments:
- // The parent control for the menu.
- //
- // Return Value:
- // None.
- //
- global proc AniAnimateMenu ( string $parent ) {
-
- setParent -m $parent;
-
- // Set Key & Hold keys
- //
- menuItem -label "Set Key"
- -command "SetKey"
- -image "setKeyframe.xpm"
- -annotation "Set Key: Select object(s) to key"
- -dragMenuCommand "performSetKeyframeArgList 1 {\"2\", \"animationList\"}" setKeyItem;
- menuItem -optionBox true
- -annotation "Set Key Option Box"
- -l "Set Key Option Box"
- -image "setKeyframe.xpm"
- -command "SetKeyOptions" setKeyOptionItem;
-
- menuItem -label "Set Breakdown"
- -command "SetBreakdownKey"
- -annotation "Set Breakdown: Select object(s) for which to set a breakdown key (maintains a proportional relationship with adjacent keys)"
- -dragMenuCommand "performSetBreakdown 2 animationList" setBreakdownItem;
- menuItem -optionBox true
- -annotation "Set Breakdown Option Box"
- -l "Set Breakdown Option Box"
- -command "SetBreakdownKeyOptions" setBreakdownOptionItem;
-
- menuItem -label "Hold Current Keys" -echoCommand true
- -command "HoldCurrentKeys"
- -annotation "Hold Current Keys: Select object(s) to set hold key"
- holdKeyItem;
-
- // Set Driven Keyframe
- //
- menuItem -l "Set Driven Key" -subMenu true -aob true -to true;
- menuItem -label "Set" -command "SetDrivenKey"
- -annotation "Set Driven Key: Select driven object(s)"
- setDrivenKeyItem;
- menuItem -optionBox true
- -annotation "Set Driven Key Option Box"
- -l "Set Driven Key Option Box"
- -command "SetDrivenKeyOptions" setDrivenKeyDialog;
-
- menuItem -divider true;
-
- menuItem -label "Go to Previous"
- -command "GoToPreviousDrivenKey"
- -annotation "Go to Previous Driven Key: Select driven object(s)"
- previousDrivenKeyItem;
-
- menuItem -label "Go to Next"
- -command "GoToNextDrivenKey"
- -annotation "Go to Next Driven Key: Select driven object(s)"
- nextDrivenKeyItem;
-
- setParent -menu ..;
-
- // Set Transform Keyframe
- //
- menuItem -l "Set Transform Keys" -subMenu true -aob true -to true;
- menuItem -label "Translate" -command "SetKeyTranslate"
- -annotation "Set Key for Translate"
- setTranslationKeyItem;
-
- menuItem -label "Rotate" -command "SetKeyRotate"
- -annotation "Set Key for Rotate"
- setRotationKeyItem;
-
- menuItem -label "Scale" -command "SetKeyScale"
- -annotation "Set Key for Scale"
- setScaleKeyItem;
-
- setParent -menu ..;
-
- // IK/FK Switching
- //
- menuItem -l "IK/FK Keys" -subMenu true -aob true -to true;
- menuItem -label "Set IK/FK Key"
- -annotation "Set keys on selected joint chains and handles."
- -command SetIKFKKeyframe
- ikFKSetKeyItem;
-
- int $ikState = `optionVar -q ikFKSwitchState`;
- string $mi = `menuItem -label "Enable IK Solver"
- -checkBox $ikState
- -ann "Toggle the solver enable state for the current selection"
- -command ToggleFkIk ikFKStateItem`;
-
- menuItem -label "Connect to IK/FK"
- -annotation "Select a node and a IK Handle."
- -command ConnectNodeToIKFK
- ikFKConnectToItem;
-
- menuItem -label "Move IK to FK"
- -annotation "Select an IK handle or IK/FK connected object."
- -command MoveIKtoFK
- moveIKtoFKitem;
-
- setUpIKSelectionScriptJob($mi);
-
- setParent -menu ..;
-
- menuItem -divider true;
- menuItem -label "Create Clip"
- -annotation "Create Clip: Select character"
- -command "CreateClip"
- -dragMenuCommand("performCreateClip 2")
- createClipItem;
- menuItem -optionBox true
- -annotation "Create Clip Option Box"
- -label "Create Clip Option Box"
- -command ("CreateClipOptions")
- createClipOptionItem;
-
- menuItem -label "Create Pose"
- -annotation "Create Pose: Select character"
- -command "CreatePose"
- -dragMenuCommand("performCreatePose 2")
- createPoseItem;
- menuItem -optionBox true
- -annotation "Create Pose Option Box"
- -label "Create Pose Option Box"
- -command ("CreatePoseOptions")
- createPoseOptionItem;
-
- menuItem -divider true;
-
- menuItem -label "Ghost Selected"
- -annotation "Ghost Selected: Select object(s) to be ghosted."
- -command "CreateGhost"
- -image "ghost.xpm"
- -dragMenuCommand("performGhost 2")
- createGhostItem;
- menuItem -optionBox true
- -annotation "Create Ghost Option Box"
- -label "Create Ghost Option Box"
- -image "ghost.xpm"
- -command ("CreateGhostOptions")
- createGhostOptionItem;
-
- menuItem -label "Unghost Selected"
- -annotation "Unghost Selected: Select object(s) to be unghosted."
- -command "DoUnghost"
- -image "ghostOff.xpm"
- -dragMenuCommand("performUnghost 2")
- UnghostItem;
- menuItem -optionBox true
- -annotation "Unghost Option Box"
- -label "Unghost Option Box"
- -image "ghostOff.xpm"
- -command ("DoUnghostOptions")
- unghostOptionItem;
-
- menuItem -label "Unghost All"
- -annotation "Unghost All: All object(s) to be unghosted."
- -image "ghostOff.xpm"
- -command "unGhostAll"
- unghostAllItem;
-
- menuItem -divider true;
-
- menuItem -label "Create Motion Trail"
- -annotation "Create MotionTrail: Select object(s) to generate a motion trail over time"
- -command "CreateMotionTrail"
- -image "motionTrail.xpm"
- -dragMenuCommand("performMotionTrail 2")
- createMotionTrailItem;
- menuItem -optionBox true
- -annotation "Create Motion Trail Option Box"
- -label "Create Motion Trail Option Box"
- -image "motionTrail.xpm"
- -command ("CreateMotionTrailOptions")
- createMotionTrailOptionItem;
-
- menuItem -l "Create Animation Snapshot"
- -image "animateSnapshot.xpm"
- -annotation "Animation Snapshot: Select animated object(s) to snapshot over time"
- -c "AnimationSnapshot"
- -dragMenuCommand "performSnapshot 2"
- snapshotItem;
- menuItem -optionBox true
- -image "animateSnapshot.xpm"
- -annotation "Create Animation Snapshot Option Box"
- -l "Animation Snapshot Option Box"
- -c "AnimationSnapshotOptions"
- snapshotDialogItem;
-
- menuItem -label "Update Motion Trail/Snapshot"
- -annotation "Update MotionTrail: Select object(s) to update their motion trail or snapshot"
- -command "updateMotionTrail"
- updateMotionTrailItem;
-
- menuItem -divider true;
-
- menuItem -l "Create Animated Sweep"
- -image "animateSweep.xpm"
- -annotation "Create Animation Sweep: Select animated curve(s) to copy over time and then loft into a surface"
- -c "AnimationSweep"
- -dragMenuCommand "performAnimSweep 2"
- animsweepItem;
- menuItem -optionBox true
- -image "animateSweep.xpm"
- -annotation "Create Animation Sweep Option Box"
- -l "Animation Sweep Option Box"
- -c "AnimationSweepOptions" animsweepDialogItem;
-
- menuItem -divider true;
-
- menuItem -subMenu true -l "Motion Paths"
- -tearOff true
- -allowOptionBoxes true
- -familyImage "menuIconPaths.xpm";
-
- // Set Path Key
- //
- menuItem -label "Set Motion Path Key" -command "SetKeyPath"
- -annotation "Set Motion Path Key: Select object to key a motion path"
- -image "motionPathKey.xpm"
- setKeyPathItem;
-
- string $attachPathItem = `menuItem -l "Attach to Motion Path"
- -c "AttachToPath"
- -annotation
- "Attach to Motion Path: Select object(s) to animate along a motion path, followed by the motion path curve"
- -image "motionPath.xpm"
- -dragMenuCommand "performPathAnimation 2" attachPathItem`;
- menuItem -optionBox true
- -annotation "Attach to Motion Path Option Box"
- -image "motionPath.xpm"
- -l "Attach to Motion Path Option Box"
- -c "AttachToPathOptions" attachPathDialogItem;
-
- // Flow Path Object
- //
- string $flowItem = `menuItem -l "Flow Path Object"
- -c "FlowPathObject"
- -annotation
- "Flow Path Object: Select path animated object(s) to flow along a motion path"
- -dragMenuCommand "performFlow 2" flowItem`;
- menuItem -optionBox true
- -annotation "Flow Path Object Option Box"
- -l "Flow Path Object Option Box"
- -c "FlowPathObjectOptions" flowDialogItem;
-
- setParent -m ..;
- }
-